/**
 * Created by Administrator on 2016/12/16.
 */

    (function(window, document) {
        function rootSize() {
            var screenWidth = document.documentElement.clientWidth || window.innerWidth;
            //        console.log(screenWidth);
            var rootSize = screenWidth > 920 ? 100 :
                screenWidth < 320 ? 320 / 920 * 100 : screenWidth / 920 * 100;
            document.documentElement.style.fontSize = rootSize + 'px';
        }
        //        window.addEventListener('DOMContentLoaded',rootSize);
        window.onload = function() {
            rootSize();
        };
        window.onresize = function() {
            rootSize();
        }
    })(window, document);

